package com.itheima.genericityclass.test;

import com.itheima.genericityclass.Box;

public class MyGenericityClass {
    public static void main(String[] args) {
        Box<String> box = new Box<>();

        box.setElement("泛型");

        String s = box.getElement();
        System.out.println("s = " + s);

        Box<Integer> box1 = new Box<>();
        box1.setElement(12);
        Integer integer = box1.getElement();
        System.out.println("integer = " + integer);
    }
}
